import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:lcapp/basic/user_info.dart';
import 'package:lcapp/widget/asr_app_bar.dart';
import 'package:lcapp/widget/asr_cache_image.dart';

class MinOpenVipSuccessPage extends StatefulWidget {
  const MinOpenVipSuccessPage({Key? key}) : super(key: key);

  @override
  _MinOpenVipSuccessPageState createState() => _MinOpenVipSuccessPageState();
}

class _MinOpenVipSuccessPageState extends State<MinOpenVipSuccessPage> {

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    refreshUserInfo(refreshBlock: (){});
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AsrAppBar(
        backgroundColor: Color(0xff3B3B49),
        barColor: Colors.white,
        titleText: '充值结果',
      ),
      body: Container(
        child: SingleChildScrollView(
          child: Stack(
            children: [
              ASRCacheImage(image: 'assets/min/min_vip_success.png',width: 1.sw,fit: BoxFit.fitWidth,),
              Positioned(child: GestureDetector(
                onTap: (){
                  Navigator.of(context).pop();
                },
                child: Container(
                  margin: EdgeInsets.symmetric(horizontal: 0.5*(1.sw-440.w)),
                  height: 80.w,
                  width: 440.w,
                  alignment: Alignment.center,
                  decoration: BoxDecoration(
                      gradient: LinearGradient(
                          colors: [Color(0xffEDD0A8),Color(0xffF1BF83)],
                          begin: Alignment.centerLeft,
                          end: Alignment.centerRight
                      ),
                      borderRadius: BorderRadius.circular(80.w)
                  ),
                  child: Row(
                    crossAxisAlignment: CrossAxisAlignment.center,
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Text('会员中心',style: TextStyle(
                          color: Color(0xff7D532A),
                          fontWeight: FontWeight.w600,
                          fontSize: 32.sp
                      ),),
                      Container(
                        padding: EdgeInsets.only(top: 6.w),
                        child:Icon(Icons.arrow_forward_ios_rounded,color: Color(0xff7D532A),size: 32.w,),
                      )
                    ],
                  ),
                ),
              ),top: 860.w,)
            ],
          ),
        ),
      ),
    );
  }
}
